local ranyingliehuo = fk.CreateSkill {

  name = "ranyingliehuo",

  tags = { Skill.Compulsory, },

}


Fk:loadTranslationTable{
  ["ranyingliehuo"] = "燃英",
  [":ranyingliehuo"] = "锁定技，当你造成伤害时，令目标额外受到一点伤害。",

  ["#ranyingliehuo"] = "燃英：锁定技，当你造成伤害时，令目标额外受到一点伤害。",
}

ranyingliehuo:addEffect(fk.Damage, {
  name = "jbstg_ranyingliehuo",
  anim_type = "offensive",
  events = {fk.Damage},
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(ranyingliehuo.name) then
      return true
    end
  end,
  on_cost = function(self, event, target, player, data)
    return true
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player.room.logic:getEventsOfScope(GameEvent.ChangeHp, 1, function(e)
     local damage = e.data.damageEvent
     if  damage and player == damage.from then
       room:notifySkillInvoked(data.to, ranyingliehuo.name,  "masochism")
      -- 对玩家造成 1 点伤害，技能名称为当前技能
      room:damage{
        to = data.to,
        damage = 1,
        skillName = ranyingliehuo.name,
      }
        end
     
   end, Player.HistoryGame)
end,
    
})

return ranyingliehuo